package cn.qlu.yhy.dao;

import java.util.Date;
import java.util.List;

import cn.qlu.yhy.model.Book;
import cn.qlu.yhy.model.Page;
import cn.qlu.yhy.model.enumpack.BookClassify;
import cn.qlu.yhy.model.enumpack.BookType;

public interface IBookDao {

    // Delete book by book id
    public boolean deleteBook(int bookId);

    // update book by book
    public boolean updateBook(Book book);

    // create book by book
    public boolean createBook(Book book);

    // get book by book id
    public Book getBookByBookId(int bookId);

    // get all books
    public List<Book> findBooksAll();

    // get all books by user id
    public List<Book> findBooksAllByUserId(int userId, Page page);

    // get books by book name
    public List<Book> findBooksByBookNAP(String bookNAP);

    // get books by book type
    public List<Book> findBooksByBookType(BookType bookType);

    // get books by book classify
    public List<Book> findBooksByBookClassify(BookClassify bookClassify);

    // get books by book author
    public List<Book> findBooksByAuthor(String author);

    // get books by press
    public List<Book> findBooksByPress(String press);

    // get books by description
    public List<Book> findBooksByDescription(String description);

    // get books by create date with start date and end date
    public List<Book> findBooksByCreateDate(Date startDate, Date endDate);

}
